<template>
    <div class="Child">
       <h1>我是子组件</h1>  
       {{ sum }}  
    </div>
  </template>
  
  <script>
  import {ref} from 'vue'
  export default {
    name:'myChild',
    async setup() {
     let sum = ref(0);
     let p =  new Promise((resolve)=>{
        setTimeout(()=>{
          resolve({sum})
        },3000);
     })
     return await p;
  }
  }
  </script>
  
  <style lang="css" scoped>
    .Child{
      background-color: skyblue;
      padding: 10px;
    }
  </style>